cmake_minimum_required (VERSION 3.21)
project (fl)
get_property (if_lib64 GLOBAL PROPERTY CMAKE_LIBRARY_USE_LIB64_PATHS)
message ("Lib64: ${if_lib64}")
get_property (if_lib32 GLOBAL PROPERTY CMAKE_LIBRARY_USE_LIB32_PATHS)
message ("lib32:" ${if_lib32})
#find_library (libvar mymath PATHS ./mylib2)
find_library (libvar mymath PATHS ./lib NO_CACHE)
if (${libvar} STREQUAL "libvar-NOTFOUND")
    message (FATAL_ERROR "required mymath library but not found!")
else()
    message (STATUS "mymath library found in ${libvar}")
endif()

add_executable (test test.cpp)
target_link_libraries (test ${libvar})
